-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved error codes in case of security exception #1753
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1753 +/- ##
============================================
- Coverage 97.33% 97.25% -0.09%
+ Complexity 4408 4406 -2
============================================
Files 388 388
Lines 10939 10944 +5
Branches 773 774 +1
============================================
- Hits 10648 10644 -4
- Misses 284 294 +10
+ Partials 7 6 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGFM but CI fails
CI Failures are unrelated to the above changes. |
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com> (cherry picked from commit bb020ac)
CI failed due to lack of jacoco coverage and UT failure!
|
@Yury-Fridlyand UT failures are due to ML-Commons. I have verified by running without my commit before merging. I have added unit tests but it requires opensearch.test framework and it is disrupting the mockito runtime libraries and causing issues in all the existing test cases. Covering with integ tests is not possible as the error scenario requires security plugin. I have created an issue to #1754 handle this. Added new issue for jacoco coverage of rest handlers: #1756 |
If your PR requires other changes to have CI passed, do it in scope of this PR or in another PR BEFORE merging this one. |
Appealing to your experience @dblock, can we leave this as is and hope for a coming fix or this PR should be reverted? |
Would like to hear his thoughts. I will try to fix ML commons error. If I could not, i will raise a revert PR by EOD. |
The error is due to opensearch-project/OpenSearch#8035
|
…t#1753) Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com> (cherry picked from commit bb020ac)
Description
Currently all the security exceptions related to datasource APIs are thrown as internal server errors.
With this change, the error message will respect the status received from upstream core service/plugins.
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.